/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ApacheClient;

import java.io.*;

/**
 *
 * @author Chris
 */
public class RunURLCache {
    public static void main(String[] args) throws Exception {
        if (args.length != 2) {
            System.err.println("Usage:  RunURLCache querySrc urlDestPrefix");
            System.exit(1);
        }
        ApacheClient client = new ApacheClient();
        BufferedReader read = new BufferedReader(new FileReader(args[0]));
        String line;
        String prefix = args[1];
        int count = 0;

        line = read.readLine();
        while (line != null) {
            count++;
            if (line.trim().length() > 1)
                client.getPage(line.trim(), prefix + count);
            line = read.readLine();
        }
    }
}
